<?php

namespace Fun\Jobeet\Model\Affiliate;

/**
 * Affiliate
 */
class Affiliate
{
  /**
   * @var integer
   */
  private $id;

  /**
   * @var string
   */
  private $url;

  /**
   * @var string
   */
  private $email;

  /**
   * @var string
   */
  private $token;

  /**
   * @var boolean
   */
  private $is_active;

  /**
   * @var \DateTime
   */
  private $created_at;

  /**
   * @var \Doctrine\Common\Collections\Collection
   */
  private $categories;

  /**
   * Constructor
   */
  public function __construct()
  {
    $this->categories = new \Doctrine\Common\Collections\ArrayCollection();
  }

  /**
   * Get id
   *
   * @return integer
   */
  public function getId()
  {
    return $this->id;
  }

  /**
   * Set url
   *
   * @param string $url
   *
   * @return Affiliate
   */
  public function setUrl($url)
  {
    $this->url = $url;

    return $this;
  }

  /**
   * Get url
   *
   * @return string
   */
  public function getUrl()
  {
    return $this->url;
  }

  /**
   * Set email
   *
   * @param string $email
   *
   * @return Affiliate
   */
  public function setEmail($email)
  {
    $this->email = $email;

    return $this;
  }

  /**
   * Get email
   *
   * @return string
   */
  public function getEmail()
  {
    return $this->email;
  }

  /**
   * Set token
   *
   * @param string $token
   *
   * @return Affiliate
   */
  public function setToken($token)
  {
    $this->token = $token;

    return $this;
  }

  /**
   * Get token
   *
   * @return string
   */
  public function getToken()
  {
    return $this->token;
  }

  /**
   * Set isActive
   *
   * @param boolean $isActive
   *
   * @return Affiliate
   */
  public function setIsActive($isActive)
  {
    $this->is_active = $isActive;

    return $this;
  }

  /**
   * Get isActive
   *
   * @return boolean
   */
  public function getIsActive()
  {
    return $this->is_active;
  }

  /**
   * Set createdAt
   *
   * @param \DateTime $createdAt
   *
   * @return Affiliate
   */
  public function setCreatedAt($createdAt)
  {
    $this->created_at = $createdAt;

    return $this;
  }

  /**
   * Get createdAt
   *
   * @return \DateTime
   */
  public function getCreatedAt()
  {
    return $this->created_at;
  }

  /**
   * Add category
   *
   * @param \Fun\Jobeet\Model\Category\Category $category
   *
   * @return Affiliate
   */
  public function addCategory(\Fun\Jobeet\Model\Category\Category $category)
  {
    $this->categories[] = $category;

    return $this;
  }

  /**
   * Remove category
   *
   * @param \Fun\Jobeet\Model\Category\Category $category
   */
  public function removeCategory(\Fun\Jobeet\Model\Category\Category $category)
  {
    $this->categories->removeElement($category);
  }

  /**
   * Get categories
   *
   * @return \Doctrine\Common\Collections\Collection
   */
  public function getCategories()
  {
    return $this->categories;
  }
  /**
   * @ORM\PrePersist
   */
  public function setCreatedAtValue()
  {
    // Add your code here
  }
}
